package com.light.gulimall.ware.dto;

import java.util.List;
import java.util.Objects;

/**
 * 采购完成
 */
public class PurchaseDoneDTO {

    /**
     *采购单id
     */
    private Long id;

    /**
     * //完成/失败的需求详情
     */
    private List<Item> items;


    public PurchaseDoneDTO() {
    }

    public PurchaseDoneDTO(Long id, List<Item> items) {
        this.id = id;
        this.items = items;
    }

    /**
     * 获取
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取
     * @return items
     */
    public List<Item> getItems() {
        return items;
    }

    /**
     * 设置
     * @param items
     */
    public void setItems(List<Item> items) {
        this.items = items;
    }

    public String toString() {
        return "PurchaseDoneDTO{id = " + id + ", items = " + items + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PurchaseDoneDTO that = (PurchaseDoneDTO) o;
        return Objects.equals(id, that.id) && Objects.equals(items, that.items);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, items);
    }
}
